#!/bin/bash
#
# generated SGE submit file for HTC command 333
# submitted for user sreenath
# There are four sections to this file
# 1. SGE Configuration settings
# 2. Environment settings
# 3. Running outside of SGE
# 4. Run Command
############
# Section 1: SGE Configuration
############

# SGE Interpret this script with the Bourne shell
#SGE_DIRECTIVE -S /usr/local/bin/bash

# NOTE: you need to 'cd' to the intial dir before submitting
#SGE_DIRECTIVE -cwd

# stdout goes to 
#SGE_DIRECTIVE -o /export/EcNitroX/eclipse/workspace/htcserver/build//testing/testprops/unittest//org/tigr/htc/server/sge/SGERunner/test_med.out
# stderr goes to 
#SGE_DIRECTIVE -e /export/EcNitroX/eclipse/workspace/htcserver/build//testing/testprops/unittest//org/tigr/htc/server/sge/SGERunner/test_med.err


# config variables
#SGE_DIRECTIVE -l fast
#SGE_DIRECTIVE -l arch=lx26*

#SGE_DIRECTIVE -p 1
#SGE_DIRECTIVE -A ANTware
#SGE_DIRECTIVE -N sleep.sh

############
# Section 2: Environment Setup Configuration
############
# 
#SGE_DIRECTIVE -v htc_id=333,request_cwd=/export/EcNitroX/eclipse/workspace/htcserver/build/testing/testprops/unittest/org/tigr/htc/server/sge/SGERunner/333

############
# Section 3: Uncomment to run outside of sge 
############
export htc_id=333
export request_cwd=/export/EcNitroX/eclipse/workspace/htcserver/build/testing/testprops/unittest/org/tigr/htc/server/sge/SGERunner/333
# cd /export/EcNitroX/eclipse/workspace/htcserver/build//testing/testprops/unittest//org/tigr/htc/server/sge/SGERunner

############
# Section 4: Run Command
############
echo "I~~~ wrapper script starting job " >> ${request_cwd}/event.log
/export/EcNitroX/eclipse/workspace/htcserver/build//testing/testprops/unittest//org/tigr/htc/server/sge/SGERunner/sleep.sh  3000
sge_ret_val=$?
sdate=$(date)
echo "F~~~${htc_id}~~~${JOB_ID}~~~$sdate~~~command finished~~~$sge_ret_val" >> ${request_cwd}/event.log
# end of submit file 
